<?php
class _fwilog {

    /**
     * Constructor method
     */
    public function __construct() {

    }

    public static function getCaller() {
        $tmp  = debug_backtrace();

        $result['class'] = $tmp[2]['class'];
        $result['function'] = $tmp[2]['function'];
        $result['file'] = $tmp[1]['file'];
        $result['line'] = $tmp[1]['line'];

        return $result;
    }

    public function begin() {
        $caller = self::getCaller();
    }

    public function end() {
        $caller = self::getCaller();
    }

    public function error($msg, $type=FDOC_SELECT) {
        $caller = self::getCaller();
    }

    public function sql($sqlstr, $table = null,  $data = null, $sqltype=FDOC_SELECT) {
        $caller = self::getCaller();
    }

    public static function create() {
        return new _fwilog();
    }
}
?>